﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../Scripts/szjt-core.js" type="text/javascript"></script>
</head>
<body>
<style>
#mainMenu {height:34px; position: absolute; right: 20px; bottom: 0px}
#mainMenu ul {float:left;background-image:url("/Images/navbg.png");color:#effaff; height:34px; line-height:34px;}
#mainMenu ul li {float:left;background:url("/Images/navline.gif") no-repeat 0px 4px;width:85px;text-align:center}
#mainMenu ul li:hover {color:#0000FF; cursor:pointer}
#sysTime {float:left; position: absolute; top: 5px; left:550px; }
#userInfo {position: absolute; right: 100px; top: 5px; border: 0px solid; color:#effaff }
#userName {color:Aqua}
#debugMode {position: absolute; right: 20px; top: 5px; border: 0px solid; color:#ef0000}
        .style1
        {
            font-size: 30pt;
            font-family: 华文新魏;
            text-align: left;
            color: #66FF33;
        }
    .style2
    {
        text-decoration: none;
    }
</style>
    <a href="Index.htm" class="style2"><div id="logo1" class="style1"></div></a>
    <div id="mainMenu">
        <img alt="" src="/Images/navleft.png" align="left" />
        <ul id="mainMenuList">
        </ul>
        <img alt="" src="/Images/navline.gif" /><img alt="" src="/Images/navright.png"/>
    </div>
    <div id="sysTime"></div>
    <div id="userInfo">当前登录用户：<span id="userName"></span></div>
    <div id="debugMode"></div>
    <img id="poweroff" alt="退出系统" src="/Images/icons/Poweroff.png" 
        
        style="position: absolute; bottom: 8px; right: 15px; z-index: 99; cursor: pointer;"/>
    <script type="text/javascript">
        var now = new Date();

        $("#logo1").text(PrjConstant.SysInfo.ProjectName);
        
        $("#sysTime").append("<Span style=\"font:28px Wingdings;color: #6CF0E2\">" + now.Format("C") + "</Span>");
        $("#sysTime").append(now.Format(" yyyy年M月d日 星期w"));
//        debugger;
        $("#userName").text(Session.LoginUser().UserName);
        setMainMenu();
        if (dataService.config.localDebug) {
            $("#debugMode").text("本地调试");
        }
        $("#poweroff").bind("click", function () {
            $.messager.confirm('退出确认', '您确认要退出本系统吗？', function (r) {
                if (r) {
                    Session.Logout();
                    window.location = "/Pages/Login.htm";
                }
            });
        });  


        function initMenuList() {
            var menuList = $("#mainMenuList").find("li");
            alert(menuList.length);
            if (menuList.length > 0) {
                menuList[0].click();
            }
        }

        function setMainMenu() {
            function getMainMenuList(){
                return([{ menuId: 1001, menuName: "经营管理"},
                        { menuId: 1003, menuName: "对外业务"},
                        { menuId: 1002, menuName: "系统监控"},
                        { menuId: 1004, menuName: "统计分析" },
                        { menuId: 2001, menuName: "系统设置"}]);
            }

            var menuList = getMainMenuList();
            for (var i in menuList) {
                $("#mainMenuList").append("<li onclick=\"setModuleMenu('" + menuList[i].menuId + "','" + 
                    menuList[i].menuName + "')\";>" + menuList[i].menuName + "</li>");
            }
        }
    </script>
</body>
</html>
